package com.leige.webconfig.Exception;

import com.leige.webconfig.http.CustomStatus;

/**
 * 业务异常类.
 * 
 * @author Administrator
 *
 */
public class CustomException extends RuntimeException {

	private int code;
	public CustomException(CustomStatus customStatus) {
		super(customStatus.message());
		this.code=customStatus.code();
	} 
	public CustomException(CustomStatus customStatus,Throwable throwable) {
		super(customStatus.message(),throwable);
		this.code=customStatus.code();
	} 
	public int getCode() {
		return code;
	}
}
